<template>
  <div id="addDrug">
    <AddDrugInBatches v-if="list.length > 0" :list="list"/>
    <AddDrug v-else/>
  </div>
</template>

<script>
import AddDrug from "./_AddDrug";
import AddDrugInBatches from "./_AddDrugInBatches";
import { commonAjaxJson, RESTFUL_API } from "../../api/api";
export default {
  data() {
    return {
      list: [],
    };
  },
  components: { AddDrug, AddDrugInBatches },
  mounted() {
     if(this.$route.query.list) {
      this.list = JSON.parse(this.$route.query.list);
    }
  }
};
</script>

<style scoped lang="less">
@import "../../common/css/component";
#addDrug {
  /deep/.mu-text-field-input {
    height: 30px;
    text-align: right;
    width: 200px;
  }
  /deep/.mu-text-field-hint {
    font-size: 14px;
    line-height: 30px;
    text-align: right;
  }
  /deep/.mu-text-field {
    width: 200px;
  }
  /deep/.mu-date-picker {
    width: 200px;
  }
}
</style>
